package zoo;

import java.util.Scanner;

public class J10Return {
	//return 문을 사용하는 메서드
	public static void main(String[] args){
		int x, y ; // 사칙연산할 입력값
		int sum , minus, multiple, divide,remainder ;
		Scanner sc = new Scanner(System.in);
		System.out.println("z,y값을 입력하세요");
		x = sc.nextInt();
		y = sc.nextInt();
		//먼저 메서드가 호출되고
		//메서드가 return한 결과값을 변수에 저장
		sum = getSum(x,y);
		minus = getMinus(x,y);
		multiple = getMultiple(x,y);
		divide = getDivide(x,y);
		remainder = getRimainder(x,y); 
		System.out.println("x : "+ x);
		System.out.println("y : "+ y);
		System.out.println("sum :"+ sum);
		System.out.println("minus : "+ minus);
		System.out.println("multiple : "+ multiple);
		System.out.println("divide : "+ divide+"..."+remainder);
		
		
	}//main() END
	public static int getSum(int x, int y){
		return x + y;
	}
	public static int getMinus(int x, int y){
		return x - y;
	}
	public static int getMultiple(int x, int y){
		return x * y;
	}
	public static int getDivide(int x, int y){
		return x / y;
	}
	public static int getRimainder(int x, int y){
		return x % y;
	}
	
}//Class END

